﻿@model OSBIDE.Web.Models.ViewModels.ForgotPasswordViewModel
@{
    ViewBag.Title = "Reset Password";
    ViewBag.IncludeHeader = false;
}

<h2>Reset Password</h2>

@if (Model.PasswordResetRequestComplete == true)
{
    <div class="notice">
        <p>
            An email with your new password has been sent to your email address.  Please allow up to an hour for delivery.  If the email does not arrive within the hour, please be sure to check your spam box.  
            If you are still having trouble, please <a href="mailto:support@osble.org">contact support</a>.
        </p>
    </div>
}
else
{
    <p>
    This form will allow you to reset the password to your OSBIDE account.  Because OSBIDE encrypts your password, the system will have to generate a new password for your account.  You should receive an email from OSBIDE with this new password within an hour of completing this form.
</p>
    using (Html.BeginForm())
    {
    @Html.ValidationSummary(true)
    <table class="form-entry">
        <tr>
            <th>@Html.LabelFor(m => m.EmailAddress):</th>
            <td>@Html.TextBoxFor(m => m.EmailAddress)</td>
            <td>@Html.ValidationMessageFor(m => m.SchoolId)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(m => m.SchoolId):</th>
            <td>@Html.DropDownListFor(m => m.SchoolId, new SelectList(Model.Schools, "Id", "Name"), String.Empty)</td>
            <td>@Html.ValidationMessageFor(m => m.SchoolId)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(m => m.InstitutionId):</th>
            <td>@Html.TextBoxFor(m => m.InstitutionId)</td>
            <td>@Html.ValidationMessageFor(m => m.InstitutionId)</td>
        </tr>
    </table>
    <input type="submit" name="submit" value="Send Password Reset Email" />
    <img class="submit-loading" src="~/Content/icons/loading.gif" title="loading" alt="loading" />
    }
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}